<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-cog"></i> 系统管理</a></li>
        <li><a ui-sref="main.sys.user.list">操作员管理</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>
<!-- 内容区域 -->
<div class="wrapper-md content">
    <div class="panel panel-default">
        <!-- 头部 -->
        <div class="panel-heading font-bold">
            <a class="btn btn-sm btn-icon btn-rounded btn-default pull-right m-t-n-xs"
               ui-sref="main.sys.user.list({'regionId':stateRegionId,'regionName':stateRegionName})"><i
                    class="text-md glyphicon glyphicon-chevron-up text-muted"></i></a>
        </div>
        <!--表单-->
        <div class="panel-body">
            <form class="form-horizontal" name="house_form">

                <div class="form-group">
                    <label for="account" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>操作员账号：</label>
                    <div class="col-lg-4">
                        <input type="text" class="form-control" ng-model="record.account" name="account" id="account" ng-readonly="NoEdit">
                    </div>
                </div>

                <div class="form-group">
                    <label for="userName" class="col-lg-1 control-label text-right"><span
                            class="text-danger wrapper-sm">*</span>操作员昵称：</label>
                    <div class="col-lg-4">
                        <input type="text" class="form-control" ng-model="record.userName" name="userName"
                               pattern="^[^\d#\$\*\+@!%\^&-=]{1,}[\u4E00-\u9FA5\uf900-\ufa2d\w]{1,50}$"
                               id="userName"
                        >
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="form-group">
                    <label for="phone" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>手机号：</label>
                    <div class="col-lg-4">
                        <!--编辑的时候-->
                        <input type="text" ng-if="NoEdit" disabled class="form-control" ng-model="record.phone" name="phone" id="phone" pattern="^1[34578]\d{9}$"
                        >
                        <!--新增的时候-->
                        <input type="text"ng-if="!NoEdit"class="form-control" ng-model="record.phone" name="phone" id="phone" pattern="^1[34578]\d{9}$"
                        >
                    </div>
                </div>
                <div class="form-group">
                    <label for="roleId" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>操作员角色：</label>
                    <div class="col-lg-4">
                        <select class="form-control" ng-model="record.roleId" name="roleId" id="roleId">
                            <option value="" ng-selected="1"></option>
                            <option ng-repeat="item in roles" value="{{item.id}}">{{item.roleName}}</option>
                        </select>
                      
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="form-group">
                    <label for="deptId" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>所属区域：</label>
                    <div class="col-lg-4">
                        <span class="form-control" ng-bind="regionName"></span>
                        <input type="text" class="form-control" ng-model="record.deptId" ng-hide="true" id="deptId">
                    </div>
                </div>
                <div class="form-group">
                    <label for="projeck" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>所属项目：</label>
                    <div class="col-lg-4">
                        <select class="form-control" ng-model="record.projectId" id="projectId" name="projectId">
                            <option ng-repeat="item in projeck" value="{{item.projectId}}" ng-bind="item.projectName"></option>
                        </select>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label for="enable" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>状态：</label>
                    <div class="col-lg-4">
                        <select class="form-control" ng-model="record.enable" id="enable">
                            <option value="1" ng-selected="1">启用</option>
                            <option value="0">禁用</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="beginTime" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>开始时间：</label>
                    <div class="col-lg-4">
                        <div class="input-group m-d">
                            <input type="text" class="form-control" name="beginTime" ng-click="openDatepicker($event,1)"
                                   current-text="今天" clear-text="清除" close-text="关闭" datepicker-popup="yyyy-MM-dd"
                                   ng-model="record.beginTime" id="beginTime"
                                   is-open="beginTime" datepicker-options="dateOptions"
                                   id="beginTime"
                            />
                            <span class="input-group-btn">
								<button type="button" class="btn btn-default"
                                        ng-click="openDatepicker($event,1)">
								<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label for="endTime" class="col-lg-1 control-label text-right"><span class="text-danger wrapper-sm">*</span>结束时间：</label>
                    <div class="col-lg-4">
                        <div class="input-group m-d">
                            <!--日期控件 ng-model 值 不会随着选择而变化， 提交时需要在重新赋下值 -->
                            <input type="text" class="form-control" name="endTime" ng-click="openDatepicker($event,2)"
                                   current-text="今天" clear-text="清除" close-text="关闭" datepicker-popup="{{format}}"
                                   ng-model="record.endTime"
                                   is-open="endTime" datepicker-options="dateOptions" id="endTime"
                            />
                            <span class="input-group-btn">
								<button type="button" class="btn btn-default" ng-click="openDatepicker($event,2)">
								<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                        </div>
                    </div>
                </div>
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label>选择日期：</label>-->
                <!--&lt;!&ndash;指定 date标记&ndash;&gt;-->
                <!--<div class='input-group date' datetimepicker  id='datetimepicker1'>-->
                <!--<input type='text' class="form-control"  ng-model="dateOne"/>-->
                <!--<span class="input-group-addon">-->
                <!--<span class="glyphicon glyphicon-calendar"></span>-->
                <!--</span>-->
                <!--</div>-->
                <!--</div>-->
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="form-group" style="width: 100%">
                    <div class="col-sm-6 col-sm-offset-2 text-center"
                         style="width: 100%;margin: 0;padding: 0;text-align: center">
                        <button type="button" class="btn  w-xs addNew" ng-show="reset" ng-click="resetFrom()">重置</button>
                        <button type="submit" class="btn btn-info w-xs m-l-xl addNew"
                                ng-disabled="isDisabled">保存
                        </button>
                    </div>
                </div>
            </form>

        </div>
    </div>

    <style scoped>

      
        .col-lg-1 {
            width: 180px;
        }

        .form-group {
            width: 50%;
            float: left;
        }

        .form-group .col-lg-2 {
            width: 25%;
        }

        .form-group .col-lg-4 {
            width: 65%;
        }

        panel-heading {
            padding: 5px 15px;
            border-bottom: none;
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;
        }

        .app-content-body .content{
            margin-top:40px;
        }
        .dropdown-menu .btn-danger{
            padding: 7px 10px;
        }
    </style>